export function loadAMap() {
    return new Promise((resolve, reject) => {
        if (window.AMap) resolve()
        window.init = function() {resolve()};
        const script = document.createElement('script')
        script.type = 'text/javascript'
        script.src = 'https://webapi.amap.com/maps?v=1.4.15&key=a29d63fce7a6585bbc99b99fd52354dc&plugin=AMap.Geocoder&callback=init'
        script.onerror = reject
        document.head.appendChild(script)
    })
}